import request from '/@/utils/request';

export function getDeptList(query?:Object) {
    return request({
        url: '/api/system/dept/list',
        method: 'get',
        params:query
    })
}

export function getDept(id:string) {
    return request({
        url: '/api/system/dept/detail/'+id,
        method: 'get',
        //params:{id}
    })
}

export function addDept(data:object) {
    return request({
        url: '/api/system/dept/save',
        method: 'post',
        data:data
    })
}


export function editDept(data:object) {
    return request({
        url: '/api/system/dept/update',
        method: 'put',
        data:data
    })
}


export function deleteDept(ids:string[]) {
    return request({
        url: '/api/system/dept/batch_delete',
        method: 'delete',
        data:{ids}
    })
}
